package com.ruoyi.process.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.process.mapper.ProcessFormMapper;
import com.ruoyi.process.domain.ProcessForm;
import com.ruoyi.process.service.IProcessFormService;

/**
 * 流程表单Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-05-20
 */
@Service
public class ProcessFormServiceImpl extends ServiceImpl<ProcessFormMapper, ProcessForm> implements IProcessFormService
{
    @Autowired
    private ProcessFormMapper processFormMapper;

    /**
     * 查询流程表单
     * 
     * @param id 流程表单主键
     * @return 流程表单
     */
    @Override
    public ProcessForm selectProcessFormById(Long id)
    {
        return processFormMapper.selectProcessFormById(id);
    }

    /**
     * 查询流程表单列表
     * 
     * @param processForm 流程表单
     * @return 流程表单
     */
    @Override
    public List<ProcessForm> selectProcessFormList(ProcessForm processForm)
    {
        return processFormMapper.selectProcessFormList(processForm);
    }

    /**
     * 新增流程表单
     * 
     * @param processForm 流程表单
     * @return 结果
     */
    @Override
    public int insertProcessForm(ProcessForm processForm)
    {
        processForm.setCreateTime(DateUtils.getNowDate());
        return processFormMapper.insertProcessForm(processForm);
    }

    /**
     * 修改流程表单
     * 
     * @param processForm 流程表单
     * @return 结果
     */
    @Override
    public int updateProcessForm(ProcessForm processForm)
    {
        processForm.setUpdateTime(DateUtils.getNowDate());
        return processFormMapper.updateProcessForm(processForm);
    }

    /**
     * 批量删除流程表单
     * 
     * @param ids 需要删除的流程表单主键
     * @return 结果
     */
    @Override
    public int deleteProcessFormByIds(Long[] ids)
    {
        return processFormMapper.deleteProcessFormByIds(ids);
    }

    /**
     * 删除流程表单信息
     * 
     * @param id 流程表单主键
     * @return 结果
     */
    @Override
    public int deleteProcessFormById(Long id)
    {
        return processFormMapper.deleteProcessFormById(id);
    }
}
